package com.supermarket.domain.strategy;


import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 正常价格策略
 */
public class NormalPriceStrategy implements PriceCalculationStrategy {
    @Override
    public BigDecimal calculate(BigDecimal pricePerJin, BigDecimal quantity) {
        return pricePerJin.multiply(quantity).setScale(2, RoundingMode.HALF_UP);
    }
}
